package com.bawei.bydayzg_two.adapter

import android.widget.TextView
import com.bawei.base.bean.CouponsResultItem
import com.bawei.bydayzg_two.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class CouponsAdapter:BaseQuickAdapter<CouponsResultItem,BaseViewHolder>(R.layout.item_coupons) {
    override fun convert(holder: BaseViewHolder, item: CouponsResultItem) {
        holder.setText(R.id.money,"${item.money}元")
        //
        holder.setText(R.id.coupons_min,"满${item.minPrice}元可用")
        //
        holder.getView<TextView>(R.id.coupons_get).text = if (item.isUse)"已领取" else "未领取"
    }
}